package my_jwt

import "github.com/golang-jwt/jwt/v5"

type JWT struct {
	secret string
}

func (jwt *JWT) UpdateSecret(newSecrete string) error {
	jwt.secret = newSecrete
	return nil
}

func (jwt *JWT) GetSecret() string {
	return jwt.secret
}

func (jwt *JWT) Generate() (string, error) {
	return generate(jwt.secret)
}

func (jwt *JWT) Verify(tokenStr string) (*jwt.Token, error) {
	return verify(tokenStr, jwt.secret)
}
